<center>

{literal}
	<script language="javascript">
		function download(fid) {
			window.open("r.php?action=download&fileid="+fid);
		}
	</script>
{/literal}

<script language="javascript">

	function rejectPackage(rowid) {ldelim}
		xajax.$('filetable'+rowid).innerHTML="{$lang.updating}";
		xajax_rejectPackage(rowid);
	{rdelim}

	function rejectFile(rowid,fileid) {ldelim}
		xajax.$('filerow'+rowid+'-'+fileid).innerHTML="{$lang.updating}";
		xajax_rejectFile(rowid,fileid);
	{rdelim}

</script>

<form id="formcommand" method="post">
	<input type="hidden" name="action" id="action" value="filecheckin"/>
	<input type="hidden" name="op" id="op" value="confirm"/>
	<table border="0" cellpadding="0" cellspacing="0" class="boxform">
		<tr>
			<td>{$lang.status}</td>
			<td>
				<select name="statusid" id="statusid">
					{foreach from=$statuslist item=strow}
						{eval var=$strow assign="stid"}
						<option value="{$strow}">{$lang.$stid}</option>
					{/foreach}
				</select>
			</td>
		</tr>
		<tr>
			<td>{$lang.comment}</td>
			<td><input type="text" name="comment" id="comment" maxlength="255" size="50">
			</td>
		</tr>			
		<tr>
			<td colspan="2" style="text-align: right">
			{include file="button.tpl" name=$lang.uploadconfirmcommit action="processForm('formcommand')"}&nbsp;
			</td>
		</tr>
	</table>
	
{foreach from=$list item=row}
	<table align="center" width="100%" border="0" cellpadding="0" cellspacing="0" id="filetable{$row->id}">
		<thead>
			<tr>
				<th colspan="2"><input type="checkbox" class="txt" name="fileid[]" id="fileid[]" value="{$row->id}" />&nbsp;{$lang.filename}: <span class="link" onclick="download('{$row->id}')">{$row->fname}</span>&nbsp;&nbsp;[<span class="link" onclick="if (confirm('{$lang.confirmreject}')) {ldelim} rejectPackage('{$row->id}') {rdelim}">{$lang.reject}</span>]</th>
			</tr>
		</thead>
		
		<tbody>
			<tr class="uneven">
				<td colspan="2">
					<ul>
						{foreach from=$row->filelist item=filerow}
							<li id="filerow{$row->id}-{$filerow->id}">{$filerow->name}&nbsp;[<span class="link" onclick="if (confirm('{$lang.confirmreject}')) {ldelim} rejectFile('{$row->id}','{$filerow->id}') {rdelim}">{$lang.reject}</span>]</li>
						{/foreach}
					</ul>
				</td>
			</tr>
		</tbody>
		
		<tfoot>
			<tr>
				<th style="text-align: left">{$row->userid}</th>
				<th>{$row->udatef($CURRENT_USER->timezone)}</th>
			</tr>
		</tfoot>
	</table>
{/foreach}

</form>
</center>

